package com.homepig.smsapi;

import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.homepig.dto.ResultRtn;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/sms")
public interface ISendSms {
    String SMS_SIGN_CODE = "每天有所进步";

    String SMS_TEMPLATE_CODE = "SMS_145597020";

    @RequestMapping(value = "/sendverificationcode/{phoneNumber}/{smsSign}/{smsTemplate}", method = RequestMethod.GET)
    ResultRtn<SendSmsResponse> sendVerificationCode(@PathVariable("phoneNumber") String phoneNumber, @PathVariable("smsSign") String smsSign,
                                                    @PathVariable("smsTemplate") String smsTemplate) throws Exception;

    @RequestMapping(value = "/sendverificationcode/{phoneNumber}/{smsSign}/{smsTemplate}/{code}", method = RequestMethod.GET)
    ResultRtn<SendSmsResponse> sendVerificationCode(@PathVariable("phoneNumber") String phoneNumber, @PathVariable("smsSign") String smsSign,
                                                    @PathVariable("smsTemplate") String smsTemplate, @PathVariable("code") String code) throws Exception;
}
